home *** CD-ROM | disk | FTP | other *** search
- global gSelectListDialog, glPFListNames, gCurrentList
-
- on setupSelectListDialog
- gSelectListDialog = new(xtra("MUI"))
- if objectp(gSelectListDialog) then
- SelectListDialogWinPropList = GetWindowPropList(gSelectListDialog)
- SelectListDialogWinPropList.name = "Select List"
- SelectListDialogWinPropList.callback = "SelectListDialogCallBack"
- SelectListDialogWinPropList.mode = #pixel
- SelectListDialogWinPropList.closeBox = 1
- SelectListDialogWinPropList.modal = 1
- SelectListDialogWinPropList.xPosition = 359
- SelectListDialogWinPropList.yPosition = 267
- SelectListDialogWinPropList.width = 298
- SelectListDialogWinPropList.height = 78
- myWindowItemList = []
- tempItemProps = GetItemPropList(gSelectListDialog)
- tempItemProps.type = #WindowBegin
- append(myWindowItemList, duplicate(tempItemProps))
- tempItemProps = GetItemPropList(gSelectListDialog)
- setProp(tempItemProps, #attributes, [#valueList: glPFListNames])
- tempItemProps.type = #PopupList
- tempItemProps.locH = 115
- tempItemProps.locV = 6
- tempItemProps.width = 160
- tempItemProps.height = 21
- append(myWindowItemList, duplicate(tempItemProps))
- tempItemProps = GetItemPropList(gSelectListDialog)
- tempItemProps.type = #label
- tempItemProps.value = "Select a List:"
- setProp(tempItemProps, #attributes, [#justification: #left, #textStyle: [#plain]])
- tempItemProps.locH = 14
- tempItemProps.locV = 8
- tempItemProps.width = 102
- tempItemProps.height = 19
- append(myWindowItemList, duplicate(tempItemProps))
- tempItemProps = GetItemPropList(gSelectListDialog)
- tempItemProps.type = #defaultPushButton
- tempItemProps.title = "New List"
- tempItemProps.locH = 135
- tempItemProps.locV = 41
- tempItemProps.width = 60
- tempItemProps.height = 18
- append(myWindowItemList, duplicate(tempItemProps))
- tempItemProps = GetItemPropList(gSelectListDialog)
- tempItemProps.type = #pushButton
- tempItemProps.title = "Cancel"
- tempItemProps.locH = 13
- tempItemProps.locV = 41
- tempItemProps.width = 60
- tempItemProps.height = 18
- append(myWindowItemList, duplicate(tempItemProps))
- tempItemProps = GetItemPropList(gSelectListDialog)
- tempItemProps.type = #WindowEnd
- append(myWindowItemList, duplicate(tempItemProps))
- Initialize(gSelectListDialog, [#windowPropList: SelectListDialogWinPropList, #windowItemList: myWindowItemList])
- else
- end if
- end
-
- on SelectListDialogCallBack event, eventData, itemPropList
- if symbolp(event) then
- case event of
- #itemChanged:
- gCurrentList = itemPropList.value
- stopSelectListDialog()
- #itemClicked:
- if itemPropList.title = "New List" then
- stopSelectListDialog()
- end if
- if itemPropList.title = "Cancel" then
- stopPersonalFile()
- end if
- if itemPropList.title = "Cancel" then
- stopSelectListDialog()
- end if
- #windowOpening:
- #windowClosed:
- #windowZoomed:
- #windowResized:
- #itemEnteringFocus:
- #itemLosingFocus:
- end case
- end if
- end
-
- on runSelectListDialog
- global gSelectListDialog
- if objectp(gSelectListDialog) then
- Run(gSelectListDialog)
- end if
- end
-
- on stopSelectListDialog
- global gSelectListDialog
- if objectp(gSelectListDialog) then
- stop(gSelectListDialog, 0)
- end if
- go(the frame)
- end
-